#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const int N=1e6+3;
mt19937 rd(chrono::steady_clock().now().time_since_epoch().count());
int Ran(int l,int r){return l+rd()%(r-l+1);}
int main()
{
	freopen("life.in","w",stdout);
	int n=Ran(2,5),m=Ran(2,n);
	cout<<n<<" "<<m<<endl;
	for(int i=2;i<=n;i++)cout<<Ran(1,i-1)<<" "<<i<<endl;
}
